package com.example.yuntiku.entity;

import java.util.List;

public class PageInfo<T>{
    private int pages;//总页数
    private int count;//总记录数
    private int size;//每页记录数
    private int page;//当前页
    private List<T> list;//当前页的数据

    public int getPages() {
        return pages;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
        //计算总页数
//        this.pages= this.count%this.size==0 ?this.count/this.size:(this.count/this.size+1);
        this.pages=(this.count-1)/this.size+1;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }
}
